import React from 'react'
import ChoiceImg from "@/static/images/user/choice_me.png"
import "./Choiceitem.less"
interface IProps{
  data:IOption
  ischeck:boolean,
  oncheck:(val:string)=>void
}
export default function Choiceitem({data,ischeck,oncheck}:IProps) {
  
  return (
    <div className='choiceitem' onClick={()=>{oncheck(data.key)}}>
      <div className='xuan'>
        <img src={ChoiceImg} style={{display:ischeck?"block":"none"}} alt="" />
      </div>
      <div className=''>{data.key}.</div>
      <div className=''>{data.value}</div>
    </div>
  )
}
